package utilities.print.menu.pager;

import utilities.print.log.LogMessage;
import utilities.print.menu.Menu;
import utilities.print.menu.MenuExecute;
import utilities.print.menu.execute.main.Login;
import utilities.print.menu.execute.main.Registration;
import utilities.print.menu.execute.userPortal.Add;
import utilities.print.menu.execute.userPortal.Delete;
import utilities.print.menu.execute.userPortal.PrintList;
import utilities.print.menu.execute.userPortal.Revise;

import java.sql.SQLException;
import java.util.TreeMap;

public class UserPortalPager implements MenuExecute {

    public static void main(String[] args) throws Exception {
        TreeMap<String, MenuExecute> m = new TreeMap<>();
        m.put("查看全部账号",new PrintList());
        m.put("添加账号",new Add());
        m.put("删除账号",new Delete());
        m.put("修改账号",new Revise());
        Menu menu = new Menu(m,"用户账号管理主页");
        menu.runMenu();
    }

    /**
     * 启动菜单功能类方法
     *
     * @throws Exception 可能产生的异常
     */
    @Override
    public void execute() throws Exception {
        UserPortalPager.main(null);
    }
}
